<template>
    <div class="admin-login">
      <span v-if="isAdminLoggedIn">管理员</span>
      <button @click="toggleAdminStatus">
        {{ isAdminLoggedIn ? "退出" : "登录" }}
      </button>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        isAdminLoggedIn: false,
      };
    },
    methods: {
      toggleAdminStatus() {
        this.isAdminLoggedIn = !this.isAdminLoggedIn;
      },
    },
  };
  </script>
  
  <style scoped>
  .admin-login {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
  }
  </style>
  